-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce CONNECT threadpool #31546
Closed
DaveCTurner
wants to merge
1
commit into
elastic:master
from
DaveCTurner:2018-06-24-connect-threadpool
Closed
Introduce CONNECT threadpool #31546
DaveCTurner
wants to merge
1
commit into
elastic:master
from
DaveCTurner:2018-06-24-connect-threadpool
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Today we attempt to (re-)connect to our peers using the management threadpool. However, during a network partition there may sometimes be a large number of concurrent connection attempts. Connection attempts to partitioned nodes or to nodes in containers that are no longer running can hang until they timeout, possibly blocking other reconnection attempts and other management activity for an extended period of time. Moreover, connecting to a peer is a relatively lightweight operation so it is reasonable to attempt a lot of them in parallel. This change introduces a separate threadpool solely for connecting to peers. Fixes elastic#29023.
DaveCTurner
added
>enhancement
:Distributed Coordination/Network
Http and internode communication implementations
v7.0.0
:Distributed Coordination/Cluster Coordination
Cluster formation and cluster state publication, including cluster membership and fault detection.
v6.4.0
labels
Jun 24, 2018
Pinging @elastic/es-core-infra |
Pinging @elastic/es-distributed |
DaveCTurner
commented
Jun 24, 2018
@@ -186,6 +188,8 @@ public ThreadPool(final Settings settings, final ExecutorBuilder<?>... customBui | |||
builders.put(Names.FETCH_SHARD_STARTED, new ScalingExecutorBuilder(Names.FETCH_SHARD_STARTED, 1, 2 * availableProcessors, TimeValue.timeValueMinutes(5))); | |||
builders.put(Names.FORCE_MERGE, new FixedExecutorBuilder(settings, Names.FORCE_MERGE, 1, -1)); | |||
builders.put(Names.FETCH_SHARD_STORE, new ScalingExecutorBuilder(Names.FETCH_SHARD_STORE, 1, 2 * availableProcessors, TimeValue.timeValueMinutes(5))); | |||
builders.put(Names.CONNECT, new ScalingExecutorBuilder(Names.CONNECT, 1, | |||
boundedBy(10 * availableProcessors, 10, 100), TimeValue.timeValueSeconds(10))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB I do not know if these numbers are reasonable.
There is an open community PR for this: #30150. |
So there is. I'll look at that in more detail tomorrow. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination
Cluster formation and cluster state publication, including cluster membership and fault detection.
:Distributed Coordination/Network
Http and internode communication implementations
>enhancement
>non-issue
v6.4.0
v7.0.0-beta1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today we attempt to (re-)connect to our peers using the management threadpool.
However, during a network partition there may sometimes be a large number of
concurrent connection attempts. Connection attempts to partitioned nodes or to
nodes in containers that are no longer running can hang until they timeout,
possibly blocking other reconnection attempts and other management activity for
an extended period of time. Moreover, connecting to a peer is a relatively
lightweight operation so it is reasonable to attempt a lot of them in parallel.
This change introduces a separate threadpool solely for connecting to peers.
Fixes #29023.